package com.atguigu.classroom.order.api;

import com.atguigu.classroom.ActivityClient.CouponFeignClient;
import com.atguigu.classroom.CourseClient.CourseFeignClient;
import com.atguigu.classroom.order.service.OrderInfoService;
import com.atguigu.classroom.result.Result;
import com.atguigu.classroom.userClient.UserInfoFeignClient;
import com.atguigu.classroom.vo.order.OrderFormVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api(tags = "用户端订单接口")
@RestController
@RequestMapping("api/order/orderInfo/")
public class OrderInfoApiController {
    @Autowired
    private OrderInfoService orderInfoService;
    @ApiOperation("新增订单接口")
    @GetMapping("submitOrder")
    public Result submitOrder(@RequestBody OrderFormVo orderFormVo){
        Long orderId=orderInfoService.submitOrder(orderFormVo);
        return Result.ok(orderId);
    }
}
